<template>
  <div class="box1">

    <el-carousel height="372px">
      <el-carousel-item v-for="item in 4" :key="item">
        <img src="@/assets/1 (4).webp" alt="">
      </el-carousel-item>
    </el-carousel>

    <div class="left">
      <div v-for="item in store.list" :key="item.id" class="left_base">
        <span class="left_base_first">{{item.name}}</span>
        <span class="left_base_ather">
          <span>{{item.children[0].name}}</span>
          <span v-if="item.children[1]">{{item.children[1].name}}</span>
        </span>
      </div>
    </div>

    <div class="bigBox">
      <div class="bigBox_top">
        <span class="fs18">分类推荐</span>
        <span class="fs16">根据您的购买或浏览记录推荐</span>
      </div>
      <div class="bigBox_list">
        <div class="bigBox_list_item">
            <div class="bigBox_list_left"></div>
            <div class="bigBox_list_right"></div>
        </div>
        <div class="bigBox_list_item"></div>
        <div class="bigBox_list_item"></div>
        <div class="bigBox_list_item"></div>
        <div class="bigBox_list_item"></div>
        <div class="bigBox_list_item"></div>
        <div class="bigBox_list_item"></div>
        <div class="bigBox_list_item"></div>
        <div class="bigBox_list_item"></div>
      </div>
    </div>

  </div>
</template>

<script setup> 
import { useCounterStore } from '@/stores/counter';
let store = useCounterStore()
</script>

<style lang="scss" scoped>
img {
  width: 100% !important;
  height: 100% 1 !important;
}
.box1 {
  position: relative;
  width: 100%;
  height: 372px;
}
.left {
  position: absolute;
  z-index: 3;
  top: 0;
  color: white;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  width: 215px;
}
.left_base {
  padding: 0 24px;
  line-height: 40px;
}
.left_base:hover {
  background-color: $xtxColor;
}
.left_base_first {
  font-size: 16px;
  margin-right: 5px;
  cursor: pointer;
}
.left_base_ather {
  font-size: 12px;
  span {
    cursor: pointer;
    margin-right: 5px;
  }
}

.demonstration {
  color: var(--el-text-color-secondary);
}

.el-carousel__item h3 {
  color: #475669;
  opacity: 0.75;
  line-height: 150px;
  margin: 0;
  text-align: center;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}
.bigBox {
  position: absolute;
  z-index: 2;
  top: 0;
  width: calc(100% - 215px);
  left: 215px;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.bigBox_top {
  background-color: #cecdce;
  line-height: 50px;
  height: 50px;
  .fs18 {
    font-size: 18px;
    margin-right: 5px;
    margin-left: 10px;
  }
  .fs16 {
    color: #475669;
  }
}
.bigBox_list {
  flex: 1;
  padding: 10px 0 0px 10px;
}
.bigBox_list_item {
  all: unset ;
  display: inline-block;
  width: calc(33.3% - 10px);
  margin-right: 10px;
  margin-bottom: 6px;
  height: 90px;
  background-color: #fff;
  border-radius: 4px;
  padding: 5px 0;
  box-sizing: border-box;
}
</style>